<?php

namespace App\Common\Util\Lock;

/**
 * Interface LockInterface
 */
interface LockInterface
{
    /**
     * 上锁
     *
     * @param string $lockSign
     * @param int    $ttl
     * @param int    $waitTime
     *
     * @return bool|LockInterface
     */
    public static function up(string $lockSign, int $ttl = 5, int $waitTime = 0): bool|static;

    /**
     * 下锁
     *
     * @return void
     */
    public function down(): void;
}